//
//  KWMBaseVC.h
//  iXiaoWeiOA
//
//  Created by kevin on 3/14/15.
//  Copyright (c) 2015 kollway. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "KWMUserDao.h"
#import "KWMSettingDao.h"
#import "KWMAPIManager.h"

@class AppDelegate;
@class MBProgressHUD;
@class KWMAPIManager;


@interface KWMBaseVC : UIViewController

@property (nonatomic) AppDelegate *appDelegate;
@property (nonatomic) BOOL isLoading;
@property (nonatomic) KWMAPIManager *apiManager;
@property (nonatomic) KWMUserDao *userDao;
@property (nonatomic) KWMSettingDao *settingDao;
@property (nonatomic) CGFloat keyboardHeight;

- (void)reLoadData;
- (void)loadData;

- (KWMBaseVC *)findControllerBy:(NSString *)controllerId inStoryboard:(NSString *)storyboardName;
+ (NSString *) kwmTag;

- (void)showEmptyView;
- (void)hideEmptyView;
@property (NS_NONATOMIC_IOSONLY, readonly, strong) MBProgressHUD *showLoading;
- (MBProgressHUD *)showLoading:(UIView *)view cancelable:(BOOL)isCancelable;
- (void)hideLoading;

- (void)showToast:(NSString *)message;
- (void)showInfo:(NSString *)message;
- (void)showInfo:(NSString *)title message:(NSString *)message;
- (void)showError:(NSError *)error;
- (void)showError:(NSError *)error errorText:(NSString *)message;
- (BOOL)hasError:(id)data;

-(void)showBackIcon;
-(void)showBackIconEmpty;
-(void)showBackIconWithShadow;
-(void)keyboardWillShow:(NSNotification *)notification;
-(void)keyboardWillHide:(NSNotification*)notification;
-(void) doReLogin;
-(BOOL) isBigScreen;

- (void)makeSeparatorZero:(id)currentId;

- (void) showMenuView;

- (void) showTabController ;
- (void) hideTabController ;
- (void)toLoginVC;
- (void)transparentNavigationBar;
- (void)unTransparentNavigationBar;

@end
